fix: Update latency check to use CLAIMED status#680
Conversation
There was a chance that the latency metric would be very spiky if a message was moving between the PENDING and CLAIMED status. Update the check to use both statuses so the latency stays consistent.
| max_delayed_task_allowed_sec: 3600, | ||
| max_message_size: 5000000, | ||
| grpc_max_message_size: 10 * 1024 * 1024, // 10MB | ||
| grpc_max_message_size: 12 * 1024 * 1024, // 12MB |
There was a problem hiding this comment.
On a related note, update the max message size default. The default Kafka topic size is 10MB, but we actually want a limit slightly higher than that, since for raw taskbrokers we wrap the Kafka message in a few more bytes.
there is an infra PR that sets it to 50 MB for profiles. i suggest to make 50 MB the default in code and remove any defaults from infra, so we don't have to worry about this anymore. (otherwise we'll have this problem with self-hosted again)
50MB payloads will be rough on SQLite and postgres because of the write throughput. Should we also be applying compression to the large profile payloads? |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit c8d29ff. Configure here.
I can follow up on this. fwiw 50 MB is not avg, but max. |
There is already a ticket to introduce that: https://linear.app/getsentry/issue/STREAM-1107/raw-mode-needs-to-compress-the-payload |

There was a chance that the latency metric would be very spiky if a message was moving between the PENDING and CLAIMED status. Update the check to use both statuses so the latency stays consistent.
On a related note, update the max message size default. The largest Kafka topic size is currently 50MB, but we actually want a limit slightly higher than that, since for raw taskbrokers we wrap the Kafka message in a few more bytes.